package org.example.admin.common.enums.errorEnum;

import org.example.admin.common.convention.errorcode.IErrorCode;

/**
 * @author weibin
 * @since 2025/10/4 18:41
 */
public enum GroupErrorCodeEnum implements IErrorCode {

    GROUP_NULL("A000500", "分组不存在"),
    GROUP_NAME_EXIST("A000501", "分组名已存在"),
    GROUP_EXIST("A000502", "分组已存在"),
    GROUP_SAVE_ERROR("A000503", "分组保存失败"),
    GROUP_UPDATE_ERROR("A000504", "分组修改失败"),
    GROUP_DELETE_ERROR("A000505", "分组删除失败"),
    GROUP_SORT_ERROR("A000506", "分组排序失败"),

    ;


    private final String code;
    private final String message;

    GroupErrorCodeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
